<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%@include file="../taglib_includes.jsp" %>
<html dir="ltr">

<head>
    <title><spring:message code="App.Title"></spring:message> </title>    
    <script type="text/javascript" src="js/jquery-main.js"></script>    
    <link rel='stylesheet' href='<c:url value="/css/common.css" />' type='text/css' media='all' />
</head>

  <body>
    <jsp:include page="../common/header.jsp" />
    <div class="content-outer">
    <div class="content">
	  <h1>Configuration</h1>
	  <h3>General Settings</h3>
  <form:form action="saveInstituteDetail.htm" method="post" commandName="instituteDetails">
   <div style="margin:0;padding:0;display:inline">
     <input name="authenticity_token" type="hidden" value="1uNy9n/9IpxRElXWyE876ETRgk5sNrQ/eTrowyksC3w=" />
    </div>
      <div class="label-field-pair">
        <label for="institution_name_type">School/College Name</label>
        <div class="text-input-bg">
          <input id="institution_name" name="name" size="30" type="text" value="" />
        </div>
        <div>
         <form:errors path="name" cssStyle="color:red"></form:errors> 
        </div>        
      </div>
      <div class="label-field-pair">
        <label for="address_type">School/College Address</label>
        <div class="text-input-bg">
          <input id="institution_address" name="address" size="30" type="text" value="" />
        </div>
      </div>
      <div class="label-field-pair">
        <label for="phone_type">School/College Phone</label>
        <div class="text-input-bg">
          <input id="institution_phone_no" name="phoneNo" size="30" type="text" value="" />
        </div>
      </div>

      <div class="label-field-pair">
        <label for="time_zone_type">Time Zone</label>
        <div class="text-input-bg">
         <select name="timeZoneId" id="timeZoneId">
			<option value="">Select</option>
			<c:forEach var="tz" items="${sessionScope.timeZones}">
			<option value="${tz.id}" <c:if test="${tournament.timeZoneId == tz.id}"> selected="selected" </c:if>>(UTC${tz.timeZoneOffset}) ${tz.timeZoneId}</option>
			</c:forEach>
		 </select>
        </div>
      </div>

      <div class="label-field-pair">
        <label for="default_country">Country</label>
        <div class="text-input-bg">
<%--           <select id="institution_country" name="countryId">
          <option value="">Select</option>			
            <c:forEach var="country" items="${sessionScope.country}">
            <option value="${country.countryId}">${country.countryName} (${country.isoCode})</option>
            </c:forEach>
            </select> --%>

<input type="hidden" id="city" name="cityId" value="" />
       
<input type="text" id="cityName" name="cityName" size="30" class="input150"  value="${cityName}" onfocus="if(this.value=='Search here') this.value='';"
onblur="if(this.value=='') {this.value='Search here';$('#city').val('');}" />
        
<script type="text/javascript">
var cityName = $('#cityName');
cityName.autocomplete('cityNameList.htm', { minChars:2, max:100, cacheLength:100, matchContains:true, autoFill:false, selectFirst:false });       
cityName.result(function(event, data, formatted) {
$('#cityName').val(data[0]);
$('#city').val(data[1]);
});
</script>

        
        </div>
      </div>

      
      
      <div class="label-field-pair">
        <label for="institution_currency_type">Currency Type</label>
        <div class="text-input-bg">
          <select id="institution_currency" name="currencyId">
			<option value="currency" selected="selected">Select Currency</option>
			<c:forEach items="${sessionScope.currencies}" var="currency">
			<option value="${currency.id}" <c:if test="${tournament.currencyId == currency.id}"> selected="selected" </c:if>>${currency.code} (${currency.symbol})</option>
			</c:forEach>
		 </select>
        </div>
      </div>
      <div class="label-field-pair">
        <label for="institution_logo_type">Upload Logo</label>
        <div class="text-input-bg">
          <input id="institution_logo" name="logoUrl" size="12" type="file" />
        </div>
      </div>

      <div class="extender"></div>
     
      <div id="submit-button">
        <input name="commit" type="submit" value="Submit" />
      </div>
    </form:form>
  </div>
  </div>
  <jsp:include page="../common/footer.jsp" />
  </body>
</html>
